using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class FALocationMap : EntityTypeConfiguration<FALocation>
    {
        public FALocationMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Reason)
                .HasMaxLength(300);

            this.Property(t => t.Person)
                .HasMaxLength(35);

            // Table & Column Mappings
            this.ToTable("FALocation");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.FAID).HasColumnName("FAID");
            this.Property(t => t.Location).HasColumnName("Location");
            this.Property(t => t.MoveDate).HasColumnName("MoveDate");
            this.Property(t => t.Reason).HasColumnName("Reason");
            this.Property(t => t.Person).HasColumnName("Person");
        }
    }
}
